package cn.kgc;

import cn.kgc.dao.InterViewDao_yy;
import cn.kgc.dao.ResumeDao_yy;
import cn.kgc.pojo.Organization;
import cn.kgc.pojo.Position_yy;
import cn.kgc.pojo.Resume_yy;
import cn.kgc.service.PositionService_yy;
import cn.kgc.service.ResumeService_yy;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: yy
 * @date: 2022/2/17
 * @description:
 */
@SpringBootTest
public class YYtest {
    @Resource
    private ResumeDao_yy rd;

    @Resource
    private InterViewDao_yy id;

    @Resource
    private ResumeService_yy rs;

    @Resource
    private PositionService_yy ps;
    //***********************************雨阳测试************************************************

    @Test
    public void yy(){

        PageHelper.startPage(1,5);
        Page<Position_yy> list = ps.selPyy(null, null, 0);
        PageInfo<Position_yy> pageInfo = new PageInfo<Position_yy>(list);
        for (Position_yy ll:list){
            System.out.println(ll);
        }
    }

    @Test
    void yy01(){
        Position_yy pyy = ps.chaPyy(1);
        System.out.println(pyy);
    }
//    @Test
//    void yy02(){
//        Resume_yy re =new Resume_yy(-1,1,"技术总监","管理","如花",
//                "女","校园招聘","12345678912","中国","中国北京",
//                "12351@qq.com","123546587245", "北京大学","团员","大专","计算机",
//                "3年",30000,"离职","是",null, "henhao",null
//                ,null,null,null,null,null,null);
//        boolean b = rs.addRyy(,re,"存档");
//        System.out.println(b);
//    }
    @Test
    void yy03(){
       // PageHelper.startPage(1,10);
        List<Resume_yy> list = rs.selRyy("", "", "", "","");

        System.out.println(list.size());

        for (Resume_yy re:list){
            System.out.println(re.getName());
        }
    }

    @Test
    void yy04(){
        Resume_yy resume = rs.chaRyy(1);
        System.out.println(resume);
    }
    @Test
    void yy05(){
        List<Resume_yy> list = rs.selRyy("", "", "", null, "");
        System.out.println(list);
    }
    @Test
    void yy06(){
        List<Organization> list = ps.selOyy();
        for(Organization oz:list){
            System.out.println(oz);
        }
    }

//    @Test
//    void yy07(){
//        Resume_yy re =new Resume_yy(47,1,"技术总监","管理","如花",
//                "女","校园招聘","12345678912","中国","中国北京",
//                "12351@qq.com","123546587245", "北京大学","团员","大专","计算机",
//                "3年",30000,"离职","是",null, "henhao",null
//                ,null,"否",null,null,null,null);
//
//        boolean b = rs.xiuRyy(re);
//        System.out.println(b);
//    }

    //******************************雨阳测试******************************************************
}
